package com.toommi.refuse.model;

import lombok.Data;

import java.util.Objects;

/**
 * ..
 * APP端用户传输对象
 * @author yangg
 * @since 2019-07-24 09:34
 */
@Data
public class AppUserModel {
    /**
     * 主键
     */
    private long id;
    /**
     * 用户名
     */
    private String name;
    /**
     * 手机号
     */
    private String phone;
    /**
     * 创建时间
     */
    private long createTime;
    /**
     * 修改时间
     */
    private long updateTime;
    /**
     * 状态
     */
    private int status;
    /**
     * 密码
     */
    private String password;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        AppUserModel that = (AppUserModel) o;
        return id == that.id &&
                createTime == that.createTime &&
                updateTime == that.updateTime &&
                status == that.status &&
                Objects.equals(name, that.name) &&
                Objects.equals(phone, that.phone) &&
                Objects.equals(password, that.password);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, name, phone, createTime, updateTime, status, password);
    }
}
